import 'package:xiongan_app_yy/entrys/rp/car_info_list_entity.dart';

class InvListDetailsEntity {
  InvListDetailsDatas datas;

  InvListDetailsEntity({this.datas});

  InvListDetailsEntity.fromJson(Map<String, dynamic> json) {
    datas = json != null ? new InvListDetailsDatas.fromJson(json) : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.datas != null) {
      data['datas'] = this.datas.toJson();
    }
    return data;
  }
}

class InvListDetailsDatas {
  String creatorUserId;
  dynamic biddingbatchid;
  String creationTime;
  String lastModificationTime;
  dynamic remark;
  dynamic deliverydate;
  String supplyname;
  dynamic total;
  dynamic totalamount;
  bool isDeleted;
  String warehouseid;
  dynamic completetime;
  String id;
  dynamic state;
  String projectid;
  String erpno;
  String taskname;
  String warehouseoutno;
  dynamic appointmentmode;
  String projectname;
  String supplierid;
  List<InvListDetailsDatasTaskdetaillist> taskDetailList;
  String lastModifierUserId;
  String appointmentmodename;
  String applytime;
  String projectno;
  dynamic biddingbatches;
  String driver;
  String carno;
  String phone;
  String tenantId;
  String taskno;
  String destination;
  String rikuproject;
  String rikutime;
  List<InvListDetailsDatasImglist> imgList;
  List<CarInfoListItem> carList;

  InvListDetailsDatas(
      {this.creatorUserId,
      this.biddingbatchid,
      this.creationTime,
      this.lastModificationTime,
      this.remark,
      this.deliverydate,
      this.supplyname,
      this.total,
      this.isDeleted,
      this.warehouseid,
      this.completetime,
      this.id,
      this.state,
      this.projectid,
      this.erpno,
      this.appointmentmode,
      this.projectname,
      this.supplierid,
      this.taskDetailList,
      this.lastModifierUserId,
      this.appointmentmodename,
      this.applytime,
      this.projectno,
      this.biddingbatches,
      this.driver,
      this.carno,
      this.phone,
      this.tenantId,
      this.taskno,
      this.destination,
      this.imgList,
      this.taskname,
      this.rikuproject,
      this.rikutime,
      this.totalamount,
      this.carList,
      this.warehouseoutno});

  InvListDetailsDatas.fromJson(Map<String, dynamic> json) {
    creatorUserId = json['creatorUserId'];
    biddingbatchid = json['biddingbatchid'];
    creationTime = json['creationTime'];
    lastModificationTime = json['lastModificationTime'];
    remark = json['remark'];
    deliverydate = json['deliverydate'];
    supplyname = json['supplyname'];
    total = json['total'];
    totalamount = json['totalamount'];
    isDeleted = json['isDeleted'];
    warehouseid = json['warehouseid'];
    completetime = json['completetime'];
    id = json['id'];
    state = json['state'];
    projectid = json['projectid'];
    erpno = json['erpno'];
    taskname = json['taskname'];
    warehouseoutno = json['warehouseoutno'];
    appointmentmode = json['appointmentmode'];
    projectname = json['projectname'];
    supplierid = json['supplierid'];
    if (json['taskDetailList'] != null) {
      taskDetailList = new List<InvListDetailsDatasTaskdetaillist>();
      (json['taskDetailList'] as List).forEach((v) {
        taskDetailList.add(new InvListDetailsDatasTaskdetaillist.fromJson(v));
      });
    }
    lastModifierUserId = json['lastModifierUserId'];
    appointmentmodename = json['appointmentmodename'];
    applytime = json['applytime'];
    projectno = json['projectno'];
    biddingbatches = json['biddingbatches'];
    driver = json['driver'];
    carno = json['carno'];
    phone = json['phone'];
    tenantId = json['tenantId'];
    taskno = json['taskno'];
    destination = json['destination'];
    rikuproject = json['rikuproject'];
    rikutime = json['rikutime'];
    if (json['imgList'] != null) {
      imgList = new List<InvListDetailsDatasImglist>();
      (json['imgList'] as List).forEach((v) {
        imgList.add(new InvListDetailsDatasImglist.fromJson(v));
      });
    }
    if (json['carList'] != null) {
      carList = new List<CarInfoListItem>();
      (json['carList'] as List).forEach((v) {
        carList.add(CarInfoListItem.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['creatorUserId'] = this.creatorUserId;
    data['biddingbatchid'] = this.biddingbatchid;
    data['creationTime'] = this.creationTime;
    data['lastModificationTime'] = this.lastModificationTime;
    data['remark'] = this.remark;
    data['deliverydate'] = this.deliverydate;
    data['supplyname'] = this.supplyname;
    data['total'] = this.total;
    data['totalamount'] = this.totalamount;
    data['isDeleted'] = this.isDeleted;
    data['warehouseid'] = this.warehouseid;
    data['completetime'] = this.completetime;
    data['id'] = this.id;
    data['state'] = this.state;
    data['projectid'] = this.projectid;
    data['erpno'] = this.erpno;
    data['taskname'] = this.taskname;
    data['warehouseoutno'] = this.warehouseoutno;
    data['appointmentmode'] = this.appointmentmode;
    data['projectname'] = this.projectname;
    data['supplierid'] = this.supplierid;
    if (this.taskDetailList != null) {
      data['taskDetailList'] =
          this.taskDetailList.map((v) => v.toJson()).toList();
    }
    data['lastModifierUserId'] = this.lastModifierUserId;
    data['appointmentmodename'] = this.appointmentmodename;
    data['applytime'] = this.applytime;
    data['projectno'] = this.projectno;
    data['biddingbatches'] = this.biddingbatches;
    data['driver'] = this.driver;
    data['carno'] = this.carno;
    data['phone'] = this.phone;
    data['tenantId'] = this.tenantId;
    data['taskno'] = this.taskno;
    data['destination'] = this.destination;
    data['rikuproject'] = this.rikuproject;
    data['rikutime'] = this.rikutime;
    data['carList'] = this.carList;
    if (this.imgList != null) {
      data['imgList'] = this.imgList.map((v) => v.toJson()).toList();
    }
    if (this.carList != null) {
      data['carList'] = this.carList.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class InvListDetailsDatasTaskdetaillist {
  dynamic creatorUserId;
  dynamic productcode;
  String batchno;
  String materialname;
  String creationTime;
  String bigcode;
  String lastModificationTime;
  String middlecode;
  dynamic remark;
  String materialid;
  bool isDeleted;
  dynamic warehouseid;
  String smallname;
  dynamic model;
  String id;
  String taskid;
  String baseunitname;
  int recqty;
  double amount;
  String bigname;
  dynamic lastModifierUserId;
  String middlename;
  dynamic erpdetailid;
  String smallcode;
  int qty;
  dynamic tenantId;
  String materialcode;
  String imageurl;
  String spec;
  dynamic quantity;

  InvListDetailsDatasTaskdetaillist(
      {this.creatorUserId,
      this.productcode,
      this.batchno,
      this.materialname,
      this.creationTime,
      this.bigcode,
      this.lastModificationTime,
      this.middlecode,
      this.remark,
      this.materialid,
      this.isDeleted,
      this.warehouseid,
      this.smallname,
      this.model,
      this.id,
      this.taskid,
      this.baseunitname,
      this.recqty,
      this.amount,
      this.bigname,
      this.lastModifierUserId,
      this.middlename,
      this.erpdetailid,
      this.smallcode,
      this.qty,
      this.tenantId,
      this.materialcode,
      this.imageurl});

  InvListDetailsDatasTaskdetaillist.fromJson(Map<String, dynamic> json) {
    creatorUserId = json['creatorUserId'];
    productcode = json['productcode'];
    batchno = json['batchno'];
    materialname = json['materialname'];
    creationTime = json['creationTime'];
    bigcode = json['bigcode'];
    lastModificationTime = json['lastModificationTime'];
    middlecode = json['middlecode'];
    remark = json['remark'];
    materialid = json['materialid'];
    isDeleted = json['isDeleted'];
    warehouseid = json['warehouseid'];
    smallname = json['smallname'];
    model = json['model'];
    id = json['id'];
    taskid = json['taskid'];
    baseunitname = json['baseunitname'];
    recqty = json['recqty'].toInt();
    amount = json['amount'];
    bigname = json['bigname'];
    lastModifierUserId = json['lastModifierUserId'];
    middlename = json['middlename'];
    erpdetailid = json['erpdetailid'];
    smallcode = json['smallcode'];
    if(json['qty']==null){
      qty = 0;
    }else{
      qty = json['qty'].toInt();
    }
    tenantId = json['tenantId'];
    imageurl = json['imageurl'];
    materialcode = json['materialcode'];
    spec = json['spec'];
    quantity = json['quantity'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['creatorUserId'] = this.creatorUserId;
    data['productcode'] = this.productcode;
    data['batchno'] = this.batchno;
    data['materialname'] = this.materialname;
    data['creationTime'] = this.creationTime;
    data['bigcode'] = this.bigcode;
    data['lastModificationTime'] = this.lastModificationTime;
    data['middlecode'] = this.middlecode;
    data['remark'] = this.remark;
    data['materialid'] = this.materialid;
    data['isDeleted'] = this.isDeleted;
    data['warehouseid'] = this.warehouseid;
    data['smallname'] = this.smallname;
    data['model'] = this.model;
    data['id'] = this.id;
    data['taskid'] = this.taskid;
    data['baseunitname'] = this.baseunitname;
    data['recqty'] = this.recqty;
    data['amount'] = this.amount;
    data['bigname'] = this.bigname;
    data['lastModifierUserId'] = this.lastModifierUserId;
    data['middlename'] = this.middlename;
    data['erpdetailid'] = this.erpdetailid;
    data['smallcode'] = this.smallcode;
    data['qty'] = this.qty;
    data['tenantId'] = this.tenantId;
    data['materialcode'] = this.materialcode;
    data['imageurl'] = this.imageurl;
    data['spec'] = this.spec;
    data['quantity'] = this.quantity;
    return data;
  }
}

class InvListDetailsDatasImglist {
  String creatorUserId;
  String imgstr;
  dynamic imgname;
  String creationTime;
  bool isDeleted;
  String lastModificationTime;
  String lastModifierUserId;
  dynamic tenantId;
  String id;
  dynamic imgtype;
  String taskid;

  InvListDetailsDatasImglist(
      {this.creatorUserId,
      this.imgstr,
      this.imgname,
      this.creationTime,
      this.isDeleted,
      this.lastModificationTime,
      this.lastModifierUserId,
      this.tenantId,
      this.id,
      this.imgtype,
      this.taskid});

  InvListDetailsDatasImglist.fromJson(Map<String, dynamic> json) {
    creatorUserId = json['creatorUserId'];
    imgstr = json['imgstr'];
    imgname = json['imgname'];
    creationTime = json['creationTime'];
    isDeleted = json['isDeleted'];
    lastModificationTime = json['lastModificationTime'];
    lastModifierUserId = json['lastModifierUserId'];
    tenantId = json['tenantId'];
    id = json['id'];
    imgtype = json['imgtype'];
    taskid = json['taskid'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['creatorUserId'] = this.creatorUserId;
    data['imgstr'] = this.imgstr;
    data['imgname'] = this.imgname;
    data['creationTime'] = this.creationTime;
    data['isDeleted'] = this.isDeleted;
    data['lastModificationTime'] = this.lastModificationTime;
    data['lastModifierUserId'] = this.lastModifierUserId;
    data['tenantId'] = this.tenantId;
    data['id'] = this.id;
    data['imgtype'] = this.imgtype;
    data['taskid'] = this.taskid;
    return data;
  }
}
